package com.atwei.mango.system.exception;

/**
 * @Classname ResponseEnum
 * @Description 返回状态码
 * @Date 2022/6/7 19:14
 * @Author liuwei
 */
public enum ResponseEnum {
    /**
     * 访问状态码
     */
    //登陆
    LOGIN_SUCCESS(200,"登陆成功"),
    LOGIN_FAILURE(401,"登陆失败"),
    LOGOUT_SUCCESS(200,"登出成功"),
    DENIED(402,"访问权限不足"),
    LOGIN_NOT(403,"未登录"),
    //业务
    BUSINESS(501,"业务繁忙"),
    ERROR(502,"业务出错"),
    SUCCESS(200,"访问成功")
    ;

    private final int code;
    private final String msg;


    ResponseEnum(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
